package com.aegean.CommercialHotelBookSystem.shop.listener;

import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;

import com.aegean.CommercialHotelBookSystem.factory.BusinessFactory;
import com.aegean.CommercialHotelBookSystem.hotel.business.IHotelBusiness;
import com.aegean.CommercialHotelBookSystem.shop.business.IShopBusiness;

public class HotelClickListener implements ServletRequestListener {

	@Override
	public void requestDestroyed(ServletRequestEvent event) {
		// TODO Auto-generated method stub
	}

	@Override
	public void requestInitialized(ServletRequestEvent event) {
		ServletRequest request = event.getServletRequest();
		String hotel_Id=request.getParameter("Hotel_Id");
		if (hotel_Id!= null) {
			IShopBusiness business = BusinessFactory.createShopBusiness();
			business.clickHotel(hotel_Id);
		}
	}
}
